import React, { useState, useEffect } from 'react'
import Card from '@/framework/card'
import { getUrlAllParams } from '@/utils'
import styles from './style.module.less'

const Index = () => {
  const [dataList, setDataList] = useState([])

  useEffect(() => {
    const str =
      'https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx761575ba4c70038a&redirect_uri=https%3A%2F%2Ffzwebapps.yjbtest.com%2Fims%2Fims-front-fund-diagnosis-h5%2F%23%2Fdiagnosis%3FshareId%3D385%26reportId%3D131&response_type=code&scope=snsapi_userinfo&state=STATE#wechat_redirec'
    console.log(decodeURIComponent(str))
  }, [])

  return (
    <div className={styles.container}>
      <div className={styles.wrap}>
        <div className={styles.left}>
          <Card title="基金排名" cardType="FundRank" />
          <div className={styles.middleWrap}>
            <div className={styles.middleLeft}>
              <Card title="基金画像变迁" cardType="FundPortrait" />
            </div>
            <div className={styles.middleCenter}>
              <Card cardType="FundRank" />
            </div>
          </div>
          <div className={styles.bottomWrap}>
            <div className={styles.bottomLeft}>
              <Card cardType="FundRank" />
            </div>
            <div className={styles.bottomcenter}>
              <Card cardType="FundRank" />
            </div>
          </div>
        </div>
        <div className={styles.right}>
          <Card title="市场指数" cardType="AbsContribution" />
          <Card title="市场指数" cardType="AbsContribution" />
        </div>
      </div>
      <Card title="基本信息" cardType="Overview" />
    </div>
  )
}

export default Index
